/*
 * Copyright (C) 2021 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
import app from '@system.app'
import {describe,beforeAll,beforeEach,afterEach,afterAll,it,expect} from '@ohos/hypium'

export default function webgl1Test_webgl11() {
	describe('webgl1Test_webgl11', function () {
		console.info('webgltest start');
		var gl;
		var gl2;

		var indices = new Uint16Array([0, 1, 2, 1, 3, 4]);
		var vertices = new Uint16Array([
			-0.5, 0.5, 0.0,
			0.0, 0.5, 0.0,
			-0.25, 0.25, 0.0,
			0.5, 0.5, 0.0,
			0.25, 0.25, 0.0,
		])

		//顶点着色器程序
		var VSHADER_SOURCE =
			"attribute vec4 a_Position;" +
			"void main() {" +
			//设置坐标
			"gl_Position = a_Position; " +
			//    "gl_PointSize = 10.0;" +
			"} ";

		//片元着色器
		var FSHADER_SOURCE =
			"void main() {" +
			//设置颜色
			"gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);" +
			"}";

		function globalFunction() {
			const vertexShader = gl.createShader(gl.VERTEX_SHADER);
			gl.shaderSource(vertexShader, VSHADER_SOURCE);
			gl.compileShader(vertexShader);
			const fragmentShader = gl.createShader(gl.FRAGMENT_SHADER);
			gl.shaderSource(fragmentShader, FSHADER_SOURCE);
			gl.compileShader(fragmentShader);
			const programObj = gl.createProgram();
			console.info("testUseProgram has failed for " + programObj)
			const useProgramError1 = gl.getError();
			console.info("useProgramError: " + useProgramError1);
			const renderBufferValue1 = gl.getParameter(gl.CURRENT_PROGRAM);
			console.info("testUseProgram has failed for " + renderBufferValue1)
			gl.attachShader(programObj, vertexShader);
			gl.attachShader(programObj, fragmentShader);
			gl.linkProgram(programObj);
			gl.useProgram(programObj);
			return programObj;
		}


		function createProgram(gl) {
			//顶点着色器程序
			var VSHADER_SOURCE =
				'attribute vec4 a_Position;\n' +
				'void main() {\n' +
				'  gl_Position = a_Position;\n' +
				'}\n';

			// 片元着色器程序
			var FSHADER_SOURCE =
				'precision mediump float;\n' +
				'uniform vec4 u_FragColor;\n' +
				'void main() {\n' +
				'  gl_FragColor = u_FragColor;\n' +
				'}\n';
			var vertexShader = gl.createShader(gl.VERTEX_SHADER);
			gl.shaderSource(vertexShader, VSHADER_SOURCE);
			gl.compileShader(vertexShader);
			var fragmentShader = gl.createShader(gl.FRAGMENT_SHADER);
			gl.shaderSource(fragmentShader, FSHADER_SOURCE);
			gl.compileShader(fragmentShader);
			const programObj = gl.createProgram();
			console.log("testUseProgram has failed for " + programObj)
			const useProgramError1 = gl.getError();
			console.info("useProgramError: " + useProgramError1);
			const renderBufferValue1 = gl.getParameter(gl.CURRENT_PROGRAM);
			console.log("testUseProgram has failed for " + renderBufferValue1)
			gl.attachShader(programObj, vertexShader);
			gl.attachShader(programObj, fragmentShader);
			gl.linkProgram(programObj);
			gl.useProgram(programObj);
			return programObj;
		}

		function initShaders(gl, vshader, fshader) {
			var program = createProgramExternal(gl, vshader, fshader);
			console.log("======createProgram program: " + JSON.stringify(program));

			if (!program) {
				console.log('Failed to create program');
				return false;
			}

			gl.useProgram(program);
			gl.program = program;

			return true;
		}

		function createProgramExternal(gl, vshader, fshader) {
			// Create shader object
			var vertexShader = loadShader(gl, gl.VERTEX_SHADER, vshader);
			console.log("======vertexShader: " + vertexShader);
			var fragmentShader = loadShader(gl, gl.FRAGMENT_SHADER, fshader);
			if (!vertexShader || !fragmentShader) {
				return null;
			}

			// Create a program object
			var program = gl.createProgram();
			console.log("======createProgram program: " + JSON.stringify(program));

			if (!program) {
				return null;
			}

			// Attach the shader objects
			gl.attachShader(program, vertexShader);
			gl.attachShader(program, fragmentShader);

			// Link the program object
			gl.linkProgram(program);

			// Check the result of linking
			var linked = gl.getProgramParameter(program, 0x8B82);
			console.log("======getProgramParameter linked: " + linked);

			const getUniformLocationValue = gl.getUniformLocation(program, "a_Position");
			console.log("======getUniformLocation: " + JSON.stringify(getUniformLocationValue));


			if (!linked) {
				var error = gl.getProgramInfoLog(program);
				console.log('Failed to link program: ' + error);
				gl.deleteProgram(program);
				gl.deleteShader(fragmentShader);
				gl.deleteShader(vertexShader);
				return null;
			}

			return program;
		}

		function loadShader(gl, type, source) {
			console.log("======into loadShader====");
			// Create shader object
			var shader = gl.createShader(type);
			if (shader == null) {
				console.log('unable to create shader');
				return null;
			}

			const isShaderValue = gl.isShader(shader);
			console.log('isShader: ' + isShaderValue);

			// Set the shader program
			gl.shaderSource(shader, source);

			// Compile the shader
			gl.compileShader(shader);

			// Check the result of compilation
			var compiled = gl.getShaderParameter(shader, gl.COMPILE_STATUS);
			if (!compiled) {
				var error = gl.getShaderInfoLog(shader);
				console.log('Failed to compile shader: ' + error);
				gl.deleteShader(shader);
				return null;
			}

			var vertex = gl.getShaderParameter(shader, gl.VERTEX_SHADER);
			console.log('getShaderParameter VERTEX_SHADER: ' + vertex);


			return shader;
		}

		function initVertexBuffers(gl) {
			var vertices = new Float32Array([
				0.0, -1.0, -0.5, 0, 0.5, 0
			]);

			var n = 3; // 点的个数

			// 创建缓冲区对象
			var vertexBuffer = gl.createBuffer();
			if (!vertexBuffer) {
				console.log('Failed to create the buffer object');
				return -1;
			}

			// 将缓冲区对象绑定到目标
			gl.bindBuffer(gl.ARRAY_BUFFER, vertexBuffer);
			// 向缓冲区对象写入数据
			gl.bufferData(gl.ARRAY_BUFFER, vertices.buffer, gl.STATIC_DRAW);

			var aPosition = gl.getAttribLocation(gl.program, 'a_Position');
			console.info("webgl# getAttribLocation getAttribLocation success:" + JSON.stringify(gl.program));
			console.info("webgl# getAttribLocation getAttribLocation success:" + aPosition);
			if (aPosition < 0) {
				console.log('Failed to get the storage location of a_Position');
				return -1;
			}
			// 将缓冲区对象分配给a_Position变量
			gl.vertexAttribPointer(aPosition, 2, gl.FLOAT, false, 0, 0);

			// 连接a_Position变量与分配给它的缓冲区对象
			gl.enableVertexAttribArray(aPosition);

			return n;
		}


		var float1 = new Float32Array([1.1, 1.2, 1.3, 1.4]);
		var int1 = new Int8Array([1, 1, 1, 1]);
		var uint1 = new Uint8Array([1, 1, 1, 1]);
		var float2 = [1.1, 1.2, 1.3, 1.4];
		var int2 = [1, 1, 1, 1];
		var uint2 = [1, 1, 1, 1];

		function initContext() {
			console.info('initContext start');
			// 获取canvas元素
			const el = global.el;
			const el2 = global.el2;
			// 获取webgl上下文
			gl = el.getContext('webgl');
			if (!gl) {
				console.log('webgltest Failed to get the rendering context for WebGL');
			}
			gl2 = el2.getContext('webgl2');
			if (!gl) {
				console.log('webgltest Failed to get the rendering context for WebGL2');
			}
			console.info('webgltest initContext finish');
		}

		function deleteContext() {
			if (gl != null) {
				gl = null;
				console.info("webgltest gl has null");
			}
			if (gl2 != null) {
				console.info("webgltest gl2 has null");
				gl2 = null;
			}
		}

		/**
		 * run before testClass
		 */
		beforeAll(async function (done) {
			console.info('webgltest beforeAll called');
			initContext();
			done();
		});

		/**
		 * run after testClass
		 */
		afterAll(async function (done) {
			console.info('webgltest afterEach called');
			deleteContext();
			done();
		})


		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_0100
		 * @tc.name testBufferDataFirst
		 * @tc.desc Test bufferData.
		 */
		it('testBufferDataFirst', 0, async function (done) {
			
			console.info('jsWebGL2 bufferData test start ...' + JSON.stringify(gl2));
			const buffer = gl.createBuffer();
			gl.bindBuffer(gl.ARRAY_BUFFER, buffer);
			gl2.bufferData(gl2.ELEMENT_ARRAY_BUFFER, 1024, gl2.DYNAMIC_DRAW);
			const errorCode = gl.getError();
			console.info("webgl2test bufferData getError: " + errorCode);
			expect(errorCode).assertEqual(gl.NO_ERROR);
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_0200
		 * @tc.name testBufferData__2
		 * @tc.desc Test bufferData.
		 */
		it('testBufferData__2', 0, async function (done) {
			
			console.info('jsWebGL2 bufferData test start ...' + JSON.stringify(gl2));
			const buffer = gl.createBuffer();
			gl.bindBuffer(gl.ARRAY_BUFFER, buffer);
			gl2.bufferData(gl2.ELEMENT_ARRAY_BUFFER, 1024, gl2.DYNAMIC_DRAW);
			const errorCode = gl.getError();
			console.info("webgl2test bufferData getError: " + errorCode);
			expect(errorCode).assertEqual(gl.NO_ERROR);
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_0300
		 * @tc.name testBufferData__3
		 * @tc.desc Test bufferData.
		 */
		it('testBufferData__3', 0, async function (done) {
			
			console.info('jsWebGL2 bufferData test start ...' + JSON.stringify(gl2));
			const buffer = gl.createBuffer();
			gl.bindBuffer(gl.ARRAY_BUFFER, buffer);
			gl2.bufferData(gl2.COPY_READ_BUFFER, 1024, gl2.STREAM_DRAW);
			const errorCode = gl.getError();
			console.info("webgl2test bufferData getError: " + errorCode);
			expect(errorCode).assertEqual(gl.NO_ERROR);
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_0400
		 * @tc.name testBufferData__4
		 * @tc.desc Test bufferData.
		 */
		it('testBufferData__4', 0, async function (done) {
			
			console.info('jsWebGL2 bufferData test start ...' + JSON.stringify(gl2));
			const buffer = gl.createBuffer();
			gl.bindBuffer(gl.ARRAY_BUFFER, buffer);
			gl2.bufferData(gl2.COPY_READ_BUFFER, 1024, gl2.STREAM_DRAW);
			const errorCode = gl.getError();
			console.info("webgl2test bufferData getError: " + errorCode);
			expect(errorCode).assertEqual(gl.NO_ERROR);
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_0500
		 * @tc.name testBufferData__5
		 * @tc.desc Test bufferData.
		 */
		it('testBufferData__5', 0, async function (done) {
			
			console.info('jsWebGL2 bufferData test start ...' + JSON.stringify(gl2));
			const buffer = gl.createBuffer();
			gl.bindBuffer(gl.ARRAY_BUFFER, buffer);
			gl2.bufferData(gl2.COPY_READ_BUFFER, 1024, gl2.STREAM_DRAW);
			const errorCode = gl.getError();
			console.info("webgl2test bufferData getError: " + errorCode);
			expect(errorCode).assertEqual(gl.NO_ERROR);
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_0600
		 * @tc.name testBufferSubData__1
		 * @tc.desc Test bufferData.
		 */
		it('testBufferSubData__1', 0, async function (done) {
			
			console.info('jsWebGL2 bufferData test start ...' + JSON.stringify(gl2));
			gl2.bufferSubData(gl2.ELEMENT_ARRAY_BUFFER, 512, new ArrayBuffer(8));
			const errorCode = gl.getError();
			console.info("webgl2test bufferSubData getError: " + errorCode);
			expect(errorCode).assertEqual(gl.NO_ERROR);
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_0700
		 * @tc.name testBufferSubData__2
		 * @tc.desc Test bufferData.
		 */
		it('testBufferSubData__2', 0, async function (done) {
			
			console.info('jsWebGL2 bufferData test start ...' + JSON.stringify(gl2));
			gl2.bufferSubData(gl.ARRAY_BUFFER, 512, new ArrayBuffer(8));
			const errorCode = gl.getError();
			console.info("webgl2test bufferSubData getError: " + errorCode);
			expect(errorCode).assertEqual(gl.INVALID_VALUE);
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_0800
		 * @tc.name testBufferSubData__3
		 * @tc.desc Test bufferData.
		 */
		it('testBufferSubData__3', 0, async function (done) {
			
			console.info('jsWebGL2 bufferData test start ...' + JSON.stringify(gl2));
			gl2.bufferSubData(gl.COPY_WRITE_BUFFER, 512, new ArrayBuffer(8));
			const errorCode = gl.getError();
			console.info("webgl2test bufferSubData getError: " + errorCode);
			expect(errorCode).assertEqual(gl.NO_ERROR);
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_0900
		 * @tc.name testTexImage2D__1
		 * @tc.desc Test texImage2D.
		 */
		it('testTexImage2D__1', 0, async function (done) {
			
			console.info('jsWebGL2 texImage2D test start ...' + JSON.stringify(gl2));
			var buffer = new ArrayBuffer(8);
			var view = new DataView(buffer, 0);
			view.setInt16(1, 42);
			gl2.texImage2D(gl2.TEXTURE_CUBE_MAP_POSITIVE_X, 0, 32, 512, 512, 0, 32, 32, view);
			const errorCode = gl.getError();
			console.info("webgl2test texImage2D getError: " + errorCode);
			expect(errorCode).assertEqual(gl.NO_ERROR);
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_1000
		 * @tc.name testTexImage2D__2
		 * @tc.desc Test texImage2D.
		 */
		it('testTexImage2D__2', 0, async function (done) {
			
			console.info('jsWebGL2 texImage2D test start ...' + JSON.stringify(gl2));
			var buffer = new ArrayBuffer(8);
			var view = new DataView(buffer, 0);
			view.setInt16(1, 42);
			gl2.texImage2D(gl2.TEXTURE_CUBE_MAP_POSITIVE_Y, 0, 32, 512, 512, 0, 32, 32, view);
			const errorCode = gl.getError();
			console.info("webgl2test texImage2D getError: " + errorCode);
			expect(errorCode).assertEqual(gl.NO_ERROR);
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_1100
		 * @tc.name testTexImage2D__3
		 * @tc.desc Test texImage2D.
		 */
		it('testTexImage2D__3', 0, async function (done) {
			
			console.info('jsWebGL2 texImage2D test start ...' + JSON.stringify(gl2));
			var buffer = new ArrayBuffer(8);
			var view = new DataView(buffer, 0);
			view.setInt16(1, 42);
			gl2.texImage2D(gl2.TEXTURE_CUBE_MAP_POSITIVE_Z, 0, 32, 512, 512, 0, 32, 32, view);
			const errorCode = gl.getError();
			console.info("webgl2test texImage2D getError: " + errorCode);
			expect(errorCode).assertEqual(gl.NO_ERROR);
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_1200
		 * @tc.name testTexSubImage2D__1
		 * @tc.desc Test texSubImage2D.
		 */
		it('testTexSubImage2D__1', 0, async function (done) {
			
			console.info('jsWebGL2 texSubImage2D test start ...' + JSON.stringify(gl2));
			var buffer = new ArrayBuffer(8);
			var view = new DataView(buffer, 0);
			view.setInt16(1, 42);
			gl2.texSubImage2D(gl2.TEXTURE_CUBE_MAP_POSITIVE_X, 0, 0, 0, 512, 512, gl.RED, gl.FLOAT,
				view, 0);
			const errorCode = gl.getError();
			console.info("webgl2test texSubImage2D getError: " + errorCode);
			expect(errorCode).assertEqual(gl.NO_ERROR);
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_1300
		 * @tc.name testTexSubImage2D__2
		 * @tc.desc Test texSubImage2D.
		 */
		it('testTexSubImage2D_2', 0, async function (done) {
			
			console.info('jsWebGL2 texSubImage2D test start ...' + JSON.stringify(gl2));
			var buffer = new ArrayBuffer(8);
			var view = new DataView(buffer, 0);
			view.setInt16(1, 42);
			gl2.texSubImage2D(gl2.TEXTURE_CUBE_MAP_POSITIVE_Y, 0, 0, 0, 512, 512, gl.RED, gl.FLOAT,
				view, 0);
			const errorCode = gl.getError();
			console.info("webgl2test texSubImage2D getError: " + errorCode);
			expect(errorCode).assertEqual(gl.NO_ERROR);
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_1400
		 * @tc.name testTexSubImage2D__3
		 * @tc.desc Test texSubImage2D.
		 */
		it('testTexSubImage2D_3', 0, async function (done) {
			
			console.info('jsWebGL2 texSubImage2D test start ...' + JSON.stringify(gl2));
			var buffer = new ArrayBuffer(8);
			var view = new DataView(buffer, 0);
			view.setInt16(1, 42);
			gl2.texSubImage2D(gl2.TEXTURE_CUBE_MAP_POSITIVE_Z, 0, 0, 0, 512, 512, gl.RED, gl.FLOAT,
				view, 0);
			const errorCode = gl.getError();
			console.info("webgl2test texSubImage2D getError: " + errorCode);
			expect(errorCode).assertEqual(gl.NO_ERROR);
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_1500
		 * @tc.name testCompressedTexImage2D__1
		 * @tc.desc Test compressedTexImage2D.
		 */
		it('testCompressedTexImage2D__1', 0, async function (done) {
			
			console.info('jsWebGL2 compressedTexImage2D test start ...' + JSON.stringify(gl2));
			gl2.compressedTexImage2D(gl2.TEXTURE_CUBE_MAP_POSITIVE_X, 0, 0x83F3, 512, 512, 0, gl
				.PIXEL_UNPACK_BUFFER, 0);
			const errorCode = gl.getError();
			console.info("webgl2test compressedTexImage2D getError: " + errorCode);
			expect(errorCode).assertEqual(gl.NO_ERROR);
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_1600
		 * @tc.name testCompressedTexImage2D__2
		 * @tc.desc Test compressedTexImage2D.
		 */
		it('testCompressedTexImage2D__2', 0, async function (done) {
			
			console.info('jsWebGL2 compressedTexImage2D test start ...' + JSON.stringify(gl2));
			gl2.compressedTexImage2D(gl2.TEXTURE_CUBE_MAP_POSITIVE_Y, 0, 0x83F3, 512, 512, 0, gl
				.PIXEL_UNPACK_BUFFER, 0);
			const errorCode = gl.getError();
			console.info("webgl2test compressedTexImage2D getError: " + errorCode);
			expect(errorCode).assertEqual(gl.NO_ERROR);
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_1700
		 * @tc.name testCompressedTexImage2D__3
		 * @tc.desc Test compressedTexImage2D.
		 */
		it('testCompressedTexImage2D__3', 0, async function (done) {
			
			console.info('jsWebGL2 compressedTexImage2D test start ...' + JSON.stringify(gl2));
			gl2.compressedTexImage2D(gl2.TEXTURE_CUBE_MAP_POSITIVE_Z, 0, 0x83F3, 512, 512, 0, gl
				.PIXEL_UNPACK_BUFFER, 0);
			const errorCode = gl.getError();
			console.info("webgl2test compressedTexImage2D getError: " + errorCode);
			expect(errorCode).assertEqual(gl.NO_ERROR);
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_1800
		 * @tc.name testCompressedTexSubImage2D__1
		 * @tc.desc Test compressedTexSubImage2D.
		 */
		it('testCompressedTexSubImage2D__1', 0, async function (done) {
			
			console.info('jsWebGL2 compressedTexSubImage2D test start ...' + JSON.stringify(gl2));
			gl2.compressedTexSubImage2D(gl2.TEXTURE_CUBE_MAP_POSITIVE_X, 0, 256, 256, 512, 512, 0x83F3,
			gl.PIXEL_UNPACK_BUFFER, 0);
			const errorCode = gl.getError();
			console.info("webgl2test compressedTexSubImage2D getError: " + errorCode);
			expect(errorCode).assertEqual(gl.NO_ERROR);
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_1900
		 * @tc.name testCompressedTexSubImage2D__2
		 * @tc.desc Test compressedTexSubImage2D.
		 */
		it('testCompressedTexSubImage2D__2', 0, async function (done) {
			
			console.info('jsWebGL2 compressedTexSubImage2D test start ...' + JSON.stringify(gl2));
			gl2.compressedTexSubImage2D(gl2.TEXTURE_CUBE_MAP_POSITIVE_Y, 0, 256, 256, 512, 512, 0x83F3,
			gl.PIXEL_UNPACK_BUFFER, 0);
			const errorCode = gl.getError();
			console.info("webgl2test compressedTexSubImage2D getError: " + errorCode);
			expect(errorCode).assertEqual(gl.NO_ERROR);
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_2000
		 * @tc.name testCompressedTexSubImage2D__3
		 * @tc.desc Test compressedTexSubImage2D.
		 */
		it('testCompressedTexSubImage2D__3', 0, async function (done) {
			
			console.info('jsWebGL2 compressedTexSubImage2D test start ...' + JSON.stringify(gl2));
			gl2.compressedTexSubImage2D(gl2.TEXTURE_CUBE_MAP_POSITIVE_Z, 0, 256, 256, 512, 512, 0x83F3,
			gl.PIXEL_UNPACK_BUFFER, 0);
			const errorCode = gl.getError();
			console.info("webgl2test compressedTexSubImage2D getError: " + errorCode);
			expect(errorCode).assertEqual(gl.NO_ERROR);
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_2100
		 * @tc.name testHint1
		 * @tc.desc Test hint.
		 */
		it('testHint1', 0, async function (done) {
			
			console.info('jsWebGL hint test start ...' + JSON.stringify(gl));
			gl.hint(gl.GENERATE_MIPMAP_HINT, gl.NICEST);
			gl.generateMipmap(gl2.TEXTURE_2D);
			const error = gl.getError();
			console.info('error' + error);
			expect(error).assertEqual(0);
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_2200
		 * @tc.name testHint2
		 * @tc.desc Test hint.
		 */
		it('testHint2', 0, async function (done) {
			
			console.info('jsWebGL hint test start ...' + JSON.stringify(gl));
			gl.hint(gl.GENERATE_MIPMAP_HINT, gl.DONT_CARE);
			gl.generateMipmap(gl2.TEXTURE_2D);
			const error = gl.getError();
			console.info('error' + error);
			expect(error).assertEqual(0);
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_2300
		 * @tc.name testIsEnabled1
		 * @tc.desc Test isEnabled.
		 */
		it('testIsEnabled1', 0, async function (done) {
			
			console.info('jsWebGL isEnabled test start ...' + JSON.stringify(gl));

			gl.enable(gl.CULL_FACE);
			const isEnabledValue1 = gl.isEnabled(gl.CULL_FACE);
			console.info("isEnabledValue1: " + isEnabledValue1);
			expect(isEnabledValue1).assertEqual(true);

			// false
			// 启用或说明给定的能力项，使用WebGLRenderingContext.enable()方法和WebGLRenderingContext.disable()方法：
			gl.disable(gl.CULL_FACE);
			const isEnabledValue2 = gl.isEnabled(gl.CULL_FACE);
			console.info("isEnabledValue2: " + isEnabledValue2);
			expect(isEnabledValue2).assertEqual(false);

			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_2400
		 * @tc.name testIsEnabled2
		 * @tc.desc Test isEnabled.
		 */
		it('testIsEnabled2', 0, async function (done) {
			
			console.info('jsWebGL isEnabled test start ...' + JSON.stringify(gl));

			gl.enable(gl.BLEND);
			const isEnabledValue1 = gl.isEnabled(gl.BLEND);
			console.info("isEnabledValue1: " + isEnabledValue1);
			expect(isEnabledValue1).assertEqual(true);

			// false
			// 启用或说明给定的能力项，使用WebGLRenderingContext.enable()方法和WebGLRenderingContext.disable()方法：
			gl.disable(gl.BLEND);
			const isEnabledValue2 = gl.isEnabled(gl.BLEND);
			console.info("isEnabledValue2: " + isEnabledValue2);
			expect(isEnabledValue2).assertEqual(false);

			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_2500
		 * @tc.name testIsEnabled3
		 * @tc.desc Test isEnabled.
		 */
		it('testIsEnabled3', 0, async function (done) {
			
			console.info('jsWebGL isEnabled test start ...' + JSON.stringify(gl));

			gl.enable(gl.POLYGON_OFFSET_FILL);
			const isEnabledValue1 = gl.isEnabled(gl.POLYGON_OFFSET_FILL);
			console.info("isEnabledValue1: " + isEnabledValue1);
			expect(isEnabledValue1).assertEqual(true);

			// false
			// 启用或说明给定的能力项，使用WebGLRenderingContext.enable()方法和WebGLRenderingContext.disable()方法：
			gl.disable(gl.POLYGON_OFFSET_FILL);
			const isEnabledValue2 = gl.isEnabled(gl.POLYGON_OFFSET_FILL);
			console.info("isEnabledValue2: " + isEnabledValue2);
			expect(isEnabledValue2).assertEqual(false);

			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_2600
		 * @tc.name testIsEnabled4
		 * @tc.desc Test isEnabled.
		 */
		it('testIsEnabled4', 0, async function (done) {
			
			console.info('jsWebGL isEnabled test start ...' + JSON.stringify(gl));

			gl.enable(gl.SAMPLE_COVERAGE);
			const isEnabledValue1 = gl.isEnabled(gl.SAMPLE_COVERAGE);
			console.info("isEnabledValue1: " + isEnabledValue1);
			expect(isEnabledValue1).assertEqual(true);

			// false
			// 启用或说明给定的能力项，使用WebGLRenderingContext.enable()方法和WebGLRenderingContext.disable()方法：
			gl.disable(gl.SAMPLE_COVERAGE);
			const isEnabledValue2 = gl.isEnabled(gl.SAMPLE_COVERAGE);
			console.info("isEnabledValue2: " + isEnabledValue2);
			expect(isEnabledValue2).assertEqual(false);

			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_2700
		 * @tc.name testRenderbufferStorage1
		 * @tc.desc Test renderbufferStorage.
		 */
		it('testRenderbufferStorage1', 0, async function (done) {
			
			console.info('jsWebGL renderbufferStorage test start ...' + JSON.stringify(gl));
			const renderBuffer = gl.createRenderbuffer();
			gl.bindRenderbuffer(gl.RENDERBUFFER, renderBuffer);
			gl.renderbufferStorage(gl.RENDERBUFFER, gl.RGB565, 256, 256);
			const width = gl.getRenderbufferParameter(gl.RENDERBUFFER, gl.RENDERBUFFER_INTERNAL_FORMAT);
			// The webgl interface transparently transmits opengl.Therefore, only need to verify the interface does not crash.
			const notCrash = true;
			expect(notCrash).assertTrue();
			for(let err; (err = gl.getError()) != gl.NO_ERROR;) {}
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_2800
		 * @tc.name testRenderbufferStorage2
		 * @tc.desc Test renderbufferStorage.
		 */
		it('testRenderbufferStorage2', 0, async function (done) {
			
			console.info('jsWebGL renderbufferStorage test start ...' + JSON.stringify(gl));
			const renderBuffer = gl.createRenderbuffer();
			gl.bindRenderbuffer(gl.RENDERBUFFER, renderBuffer);
			gl.renderbufferStorage(gl.RENDERBUFFER, gl.RGB5_A1, 256, 256);
			const width = gl.getRenderbufferParameter(gl.RENDERBUFFER, gl.RENDERBUFFER_INTERNAL_FORMAT);
			// The webgl interface transparently transmits opengl.Therefore, only need to verify the interface does not crash.
			const notCrash = true;
			expect(notCrash).assertTrue();
			for(let err; (err = gl.getError()) != gl.NO_ERROR;) {}
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_2900
		 * @tc.name testRenderbufferStorage3
		 * @tc.desc Test renderbufferStorage.
		 */
		it('testRenderbufferStorage3', 0, async function (done) {
			
			console.info('jsWebGL renderbufferStorage test start ...' + JSON.stringify(gl));
			const renderBuffer = gl.createRenderbuffer();
			gl.bindRenderbuffer(gl.RENDERBUFFER, renderBuffer);
			gl.renderbufferStorage(gl.RENDERBUFFER, gl.DEPTH_STENCIL, 256, 256);

			const width = gl.getRenderbufferParameter(gl.RENDERBUFFER, gl.RENDERBUFFER_INTERNAL_FORMAT);
			expect(width).assertEqual(gl.RGBA4);
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_3000
		 * @tc.name testStencilFunc1
		 * @tc.desc Test stencilFunc.
		 */
		it('testStencilFunc1', 0, async function (done) {
			
			console.info('jsWebGL stencilFunc test start ...' + JSON.stringify(gl));
			gl.enable(gl.STENCIL_TEST);
			gl.stencilFunc(gl.NEVER, 0, 0b1110011);
			const stencilFuncParameter = gl.getParameter(gl.STENCIL_FUNC);
			console.info("stencilFunc stencilFuncParameter: " + stencilFuncParameter);
			expect(stencilFuncParameter).assertEqual(gl.NEVER);
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_3100
		 * @tc.name testStencilFunc2
		 * @tc.desc Test stencilFunc.
		 */
		it('testStencilFunc2', 0, async function (done) {
			
			console.info('jsWebGL stencilFunc test start ...' + JSON.stringify(gl));
			gl.enable(gl.STENCIL_TEST);
			gl.stencilFunc(gl.EQUAL, 0, 0b1110011);
			const stencilFuncParameter = gl.getParameter(gl.STENCIL_FUNC);
			console.info("stencilFunc stencilFuncParameter: " + stencilFuncParameter);
			expect(stencilFuncParameter).assertEqual(gl.EQUAL);
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_3200
		 * @tc.name testStencilFunc3
		 * @tc.desc Test stencilFunc.
		 */
		it('testStencilFunc3', 0, async function (done) {
			
			console.info('jsWebGL stencilFunc test start ...' + JSON.stringify(gl));
			gl.enable(gl.STENCIL_TEST);
			gl.stencilFunc(gl.GREATER, 0, 0b1110011);
			const stencilFuncParameter = gl.getParameter(gl.STENCIL_FUNC);
			console.info("stencilFunc stencilFuncParameter: " + stencilFuncParameter);
			expect(stencilFuncParameter).assertEqual(gl.GREATER);
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_3300
		 * @tc.name testStencilFuncSeparate1
		 * @tc.desc Test stencilFuncSeparate.
		 */
		it('testStencilFuncSeparate1', 0, async function (done) {
			
			console.info('jsWebGL stencilFuncSeparate test start ...' + JSON.stringify(gl));
			gl.enable(gl.STENCIL_TEST);
			gl.stencilFuncSeparate(gl.BACK, gl.EQUAL, 0.2, 1110011);
			const stencilFuncSeparateParameter = gl.getParameter(gl.STENCIL_FUNC);
			console.info("stencilFuncSeparate stencilFuncSeparateParameter: " +
			stencilFuncSeparateParameter);
			expect(stencilFuncSeparateParameter).assertEqual(gl.GREATER);
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_3400
		 * @tc.name testStencilFuncSeparate2
		 * @tc.desc Test stencilFuncSeparate.
		 */
		it('testStencilFuncSeparate2', 0, async function (done) {
			
			console.info('jsWebGL stencilFuncSeparate test start ...' + JSON.stringify(gl));
			gl.enable(gl.STENCIL_TEST);
			gl.stencilFuncSeparate(gl.FRONT_AND_BACK, gl.LEQUAL, 0.2, 1110011);
			const stencilFuncSeparateParameter = gl.getParameter(gl.STENCIL_FUNC);
			console.info("stencilFuncSeparate stencilFuncSeparateParameter: " +
			stencilFuncSeparateParameter);
			expect(stencilFuncSeparateParameter).assertEqual(gl.LEQUAL);
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_3500
		 * @tc.name testStencilMaskSeparate2
		 * @tc.desc Test stencilMaskSeparate.
		 */
		it('testStencilMaskSeparate2', 0, async function (done) {
			
			console.info('jsWebGL stencilMaskSeparate test start ...' + JSON.stringify(gl));
			gl.stencilMaskSeparate(gl.FRONT_AND_BACK, 110101);
			const stencilMaskSeparateParameter = gl.getParameter(gl.STENCIL_WRITEMASK);
			console.info("stencilMaskSeparate stencilMaskSeparateParameter: " +
			stencilMaskSeparateParameter);
			// The webgl interface transparently transmits opengl.Therefore, only need to verify the interface does not crash.
			const notCrash = true;
			expect(notCrash).assertTrue();
			for(let err; (err = gl.getError()) != gl.NO_ERROR;) {}
			done();
		});


		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_3600
		 * @tc.name webgl_test_bindFramebuffer_1
		 * @tc.desc Test bindFramebuffer.
		 */
		it('webgl_test_bindFramebuffer_1', 0, async function (done) {
			
			console.info("webgltest into bindFramebuffer");

			var framebuffer = gl.createFramebuffer();

			const isFramebuffer1 = gl.isFramebuffer(framebuffer);
			console.info("createFramebuffer --> isFramebuffer1: " + isFramebuffer1);
			expect(isFramebuffer1).assertEqual(false);

			// bind
			gl.bindFramebuffer(gl2.READ_FRAMEBUFFER, framebuffer);

			const isFrameBuffer2 = gl.isFramebuffer(framebuffer);
			console.info("createFramebuffer --> bindFramebuffer --> isFramebuffer_2: " +
			isFrameBuffer2);
			var openGLVersion = gl.getParameter(gl.VERSION);
			console.info("openGLVersion: " + openGLVersion);
			var version = "OpenGL,ES,3";
			if (openGLVersion > version) {
			    expect(isFrameBuffer2).assertEqual(true);
			} else {
			    expect(isFrameBuffer2).assertEqual(false);
			}
			
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_3700
		 * @tc.name webgl_test_bindFramebuffer_2
		 * @tc.desc Test bindFramebuffer.
		 */
		it('webgl_test_bindFramebuffer_2', 0, async function (done) {
			
			console.info("webgltest into bindFramebuffer");

			var framebuffer = gl.createFramebuffer();

			const isFramebuffer1 = gl.isFramebuffer(framebuffer);
			console.info("createFramebuffer --> isFramebuffer1: " + isFramebuffer1);
			expect(isFramebuffer1).assertEqual(false);

			// bind
			gl.bindFramebuffer(gl2.DRAW_FRAMEBUFFER, framebuffer);

			const isFrameBuffer2 = gl.isFramebuffer(framebuffer);
			console.info("createFramebuffer --> bindFramebuffer --> isFramebuffer_2: " +
			isFrameBuffer2);
			var openGLVersion = gl.getParameter(gl.VERSION);
			console.info("openGLVersion: " + openGLVersion);
			var version = "OpenGL,ES,3";
			if (openGLVersion > version) {
			    expect(isFrameBuffer2).assertEqual(true);
			} else {
			    expect(isFrameBuffer2).assertEqual(false);
			}
			
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_3800
		 * @tc.name testGetRenderbufferParameter_1
		 * @tc.desc Test getRenderbufferParameter.
		 */
		it('testGetRenderbufferParameter_1', 0, async function (done) {
			
			console.info('jsWebGL getRenderbufferParameter test start ...' + JSON.stringify(gl));
			const renderBuffer = gl.createRenderbuffer();
			gl.bindRenderbuffer(gl.RENDERBUFFER, renderBuffer);
			gl.renderbufferStorage(gl.RENDERBUFFER, gl.RGBA4, 256, 256);

			const height = gl.getRenderbufferParameter(gl.RENDERBUFFER, gl.RENDERBUFFER_HEIGHT);
			expect(height).assertEqual(256);
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_3900
		 * @tc.name testGetRenderbufferParameter_2
		 * @tc.desc Test getRenderbufferParameter.
		 */
		it('testGetRenderbufferParameter_2', 0, async function (done) {
			
			console.info('jsWebGL getRenderbufferParameter test start ...' + JSON.stringify(gl));
			const renderBuffer = gl.createRenderbuffer();
			gl.bindRenderbuffer(gl.RENDERBUFFER, renderBuffer);
			gl.renderbufferStorage(gl.RENDERBUFFER, gl.RGBA4, 256, 256);

			const size = gl.getRenderbufferParameter(gl.RENDERBUFFER, gl.RENDERBUFFER_BLUE_SIZE);
			expect(size).assertEqual(4);
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_4000
		 * @tc.name testGetRenderbufferParameter_3
		 * @tc.desc Test getRenderbufferParameter.
		 */
		it('testGetRenderbufferParameter_3', 0, async function (done) {
			
			console.info('jsWebGL getRenderbufferParameter test start ...' + JSON.stringify(gl));
			const renderBuffer = gl.createRenderbuffer();
			gl.bindRenderbuffer(gl.RENDERBUFFER, renderBuffer);
			gl.renderbufferStorage(gl.RENDERBUFFER, gl.RGBA4, 256, 256);

			const size = gl.getRenderbufferParameter(gl.RENDERBUFFER, gl.RENDERBUFFER_RED_SIZE);
			expect(size).assertEqual(4);
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_4100
		 * @tc.name testGetRenderbufferParameter_4
		 * @tc.desc Test getRenderbufferParameter.
		 */
		it('testGetRenderbufferParameter_4', 0, async function (done) {
			
			console.info('jsWebGL getRenderbufferParameter test start ...' + JSON.stringify(gl));
			const renderBuffer = gl.createRenderbuffer();
			gl.bindRenderbuffer(gl.RENDERBUFFER, renderBuffer);
			gl.renderbufferStorage(gl.RENDERBUFFER, gl.RGBA4, 256, 256);

			const size = gl.getRenderbufferParameter(gl.RENDERBUFFER, gl.RENDERBUFFER_ALPHA_SIZE);
			expect(size).assertEqual(4);
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_4200
		 * @tc.name testGetRenderbufferParameter_5
		 * @tc.desc Test getRenderbufferParameter.
		 */
		it('testGetRenderbufferParameter_5', 0, async function (done) {
			
			console.info('jsWebGL getRenderbufferParameter test start ...' + JSON.stringify(gl));
			const renderBuffer = gl.createRenderbuffer();
			gl.bindRenderbuffer(gl.RENDERBUFFER, renderBuffer);
			gl.renderbufferStorage(gl.RENDERBUFFER, gl.RGBA4, 256, 256);
			const size = gl.getRenderbufferParameter(gl.RENDERBUFFER, gl.RENDERBUFFER_DEPTH_SIZE);
			expect(size).assertEqual(0);
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_4300
		 * @tc.name testGetRenderbufferParameter_6
		 * @tc.desc Test getRenderbufferParameter.
		 */
		it('testGetRenderbufferParameter_6', 0, async function (done) {
			
			console.info('jsWebGL getRenderbufferParameter test start ...' + JSON.stringify(gl));
			const renderBuffer = gl.createRenderbuffer();
			gl.bindRenderbuffer(gl2.RENDERBUFFER, renderBuffer);
			gl2.renderbufferStorageMultisample(gl2.RENDERBUFFER, 4, gl.RBGA4, 256, 256);
			const size = gl.getRenderbufferParameter(gl2.RENDERBUFFER, gl2.RENDERBUFFER_SAMPLES);
			expect(size).assertEqual();
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_4400
		 * @tc.name testGetRenderbufferParameter_7
		 * @tc.desc Test getRenderbufferParameter.
		 */
		it('testGetRenderbufferParameter_7', 0, async function (done) {
			
			console.info('jsWebGL getRenderbufferParameter test start ...' + JSON.stringify(gl));
			const renderBuffer = gl.createRenderbuffer();
			gl.bindRenderbuffer(gl.RENDERBUFFER, renderBuffer);
			gl.renderbufferStorage(gl.RENDERBUFFER, gl.RGBA4, 256, 256);

			const size = gl.getRenderbufferParameter(gl.RENDERBUFFER, gl.RENDERBUFFER_STENCIL_SIZE);
			expect(size).assertEqual(0);
			done();
		});


		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_4500
		 * @tc.name webgl_test_copyTexSubImage2D1
		 * @tc.desc Test copyTexSubImage2D.
		 */
		it('webgl_test_copyTexSubImage2D1', 0, async function (done) {
			
			console.info("webgltest into copyTexSubImage2D");

			gl.copyTexSubImage2D(gl.TEXTURE_CUBE_MAP_NEGATIVE_X, 0, 0, 0, 0, 0, 16, 16);
			let errorCode = gl.getError();
			console.info("webgltest copyTexSubImage2D getError: " + errorCode);
			expect(errorCode).assertLarger(gl.NO_ERROR);
			
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_4600
		 * @tc.name webgl_test_copyTexSubImage2D2
		 * @tc.desc Test copyTexSubImage2D.
		 */
		it('webgl_test_copyTexSubImage2D2', 0, async function (done) {
			
			console.info("webgltest into copyTexSubImage2D");
			gl.copyTexSubImage2D(gl.TEXTURE_CUBE_MAP_NEGATIVE_Z, 0, 0, 0, 0, 0, 16, 16);
			let errorCode = gl.getError();
			console.info("webgltest copyTexSubImage2D getError: " + errorCode);
			expect(errorCode).assertLarger(gl.NO_ERROR);
			for(let err; (err = gl.getError()) != gl.NO_ERROR;) {}
			
			done();
		});


		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_4700
		 * @tc.name webgl_test_drawElements_3
		 * @tc.desc Test drawElements.
		 */
		it('webgl_test_drawElements_3', 0, async function (done) {
			
			console.info("webgltest into drawElements");

			gl.drawElements(gl.LINE_STRIP, 8, gl.UNSIGNED_BYTE, 0);

			let errorCode = gl.getError();
			console.info("webgltest drawElements getError: " + errorCode);
			expect(errorCode).assertEqual(gl.INVALID_FRAMEBUFFER_OPERATION);
			
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_4800
		 * @tc.name webgl_test_drawElements_4
		 * @tc.desc Test drawElements.
		 */
		it('webgl_test_drawElements_4', 0, async function (done) {
			
			console.info("webgltest into drawElements");

			gl.drawElements(gl.POINTS, 8, gl.UNSIGNED_INT, 0);

			let errorCode = gl.getError();
			console.info("webgltest drawElements getError: " + errorCode);
			expect(errorCode).assertEqual(gl.INVALID_FRAMEBUFFER_OPERATION);
			
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_4900
		 * @tc.name webgl_test_drawElements_5
		 * @tc.desc Test drawElements.
		 */
		it('webgl_test_drawElements_5', 0, async function (done) {
			
			console.info("webgltest into drawElements");

			gl.drawElements(gl.LINE_LOOP, 8, gl.UNSIGNED_INT, 0);

			let errorCode = gl.getError();
			console.info("webgltest drawElements getError: " + errorCode);
			expect(errorCode).assertEqual(gl.INVALID_FRAMEBUFFER_OPERATION);
			
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_5000
		 * @tc.name webgl_test_drawElements_6
		 * @tc.desc Test drawElements.
		 */
		it('webgl_test_drawElements_6', 0, async function (done) {
			
			console.info("webgltest into drawElements");

			gl.drawElements(gl.LINES, 8, gl.UNSIGNED_INT, 0);

			let errorCode = gl.getError();
			console.info("webgltest drawElements getError: " + errorCode);
			expect(errorCode).assertEqual(gl.INVALID_FRAMEBUFFER_OPERATION);
			
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_5100
		 * @tc.name webgl_test_framebufferRenderbuffer1
		 * @tc.desc Test framebufferRenderbuffer.
		 */
		it('webgl_test_framebufferRenderbuffer1', 0, async function (done) {
			
			console.info("webgltest into framebufferRenderbuffer");

			const renderbuffer = gl.createRenderbuffer();
			gl.framebufferRenderbuffer(gl.READ_FRAMEBUFFER, gl.COLOR_ATTACHMENT1, gl.RENDERBUFFER,
				renderbuffer);

			let errorCode = gl.getError();
			console.info("webgltest framebufferRenderbuffer getError: " + errorCode);
			expect(errorCode).assertEqual(gl.NO_ERROR);
			
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_5200
		 * @tc.name webgl_test_framebufferRenderbuffer2
		 * @tc.desc Test framebufferRenderbuffer.
		 */
		it('webgl_test_framebufferRenderbuffer2', 0, async function (done) {
			
			console.info("webgltest into framebufferRenderbuffer");

			const renderbuffer = gl.createRenderbuffer();
			gl.framebufferRenderbuffer(gl.READ_FRAMEBUFFER, gl.COLOR_ATTACHMENT2, gl.RENDERBUFFER,
				renderbuffer);

			let errorCode = gl.getError();
			console.info("webgltest framebufferRenderbuffer getError: " + errorCode);
			expect(errorCode).assertEqual(gl.NO_ERROR);
			
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_5300
		 * @tc.name webgl_test_framebufferRenderbuffer3
		 * @tc.desc Test framebufferRenderbuffer.
		 */
		it('webgl_test_framebufferRenderbuffer3', 0, async function (done) {
			
			console.info("webgltest into framebufferRenderbuffer");

			const renderbuffer = gl.createRenderbuffer();
			gl.framebufferRenderbuffer(gl.READ_FRAMEBUFFER, gl.COLOR_ATTACHMENT3, gl.RENDERBUFFER,
				renderbuffer);

			let errorCode = gl.getError();
			console.info("webgltest framebufferRenderbuffer getError: " + errorCode);
			expect(errorCode).assertEqual(gl.NO_ERROR);
			
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_5400
		 * @tc.name webgl_test_framebufferRenderbuffer4
		 * @tc.desc Test framebufferRenderbuffer.
		 */
		it('webgl_test_framebufferRenderbuffer4', 0, async function (done) {
			
			console.info("webgltest into framebufferRenderbuffer");

			const renderbuffer = gl.createRenderbuffer();
			gl.framebufferRenderbuffer(gl.READ_FRAMEBUFFER, gl.COLOR_ATTACHMENT4, gl.RENDERBUFFER,
				renderbuffer);

			let errorCode = gl.getError();
			console.info("webgltest framebufferRenderbuffer getError: " + errorCode);
			expect(errorCode).assertEqual(gl.NO_ERROR);
			
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_5500
		 * @tc.name webgl_test_framebufferRenderbuffer5
		 * @tc.desc Test framebufferRenderbuffer.
		 */
		it('webgl_test_framebufferRenderbuffer5', 0, async function (done) {
			
			console.info("webgltest into framebufferRenderbuffer");

			const renderbuffer = gl.createRenderbuffer();
			gl.framebufferRenderbuffer(gl.READ_FRAMEBUFFER, gl.COLOR_ATTACHMENT5, gl.RENDERBUFFER,
				renderbuffer);

			let errorCode = gl.getError();
			console.info("webgltest framebufferRenderbuffer getError: " + errorCode);
			expect(errorCode).assertEqual(gl.NO_ERROR);
			
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_5600
		 * @tc.name webgl_test_framebufferRenderbuffer6
		 * @tc.desc Test framebufferRenderbuffer.
		 */
		it('webgl_test_framebufferRenderbuffer6', 0, async function (done) {
			
			console.info("webgltest into framebufferRenderbuffer");

			const renderbuffer = gl.createRenderbuffer();
			gl.framebufferRenderbuffer(gl.READ_FRAMEBUFFER, gl.COLOR_ATTACHMENT6, gl.RENDERBUFFER,
				renderbuffer);

			let errorCode = gl.getError();
			console.info("webgltest framebufferRenderbuffer getError: " + errorCode);
			expect(errorCode).assertEqual(gl.NO_ERROR);
			
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_5700
		 * @tc.name webgl_test_framebufferRenderbuffer7
		 * @tc.desc Test framebufferRenderbuffer.
		 */
		it('webgl_test_framebufferRenderbuffer7', 0, async function (done) {
			
			console.info("webgltest into framebufferRenderbuffer");

			const renderbuffer = gl.createRenderbuffer();
			gl.framebufferRenderbuffer(gl.READ_FRAMEBUFFER, gl.COLOR_ATTACHMENT7, gl.RENDERBUFFER,
				renderbuffer);

			let errorCode = gl.getError();
			console.info("webgltest framebufferRenderbuffer getError: " + errorCode);
			expect(errorCode).assertEqual(gl.NO_ERROR);
			
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_5800
		 * @tc.name webgl_test_framebufferRenderbuffer8
		 * @tc.desc Test framebufferRenderbuffer.
		 */
		it('webgl_test_framebufferRenderbuffer8', 0, async function (done) {
			
			console.info("webgltest into framebufferRenderbuffer");

			const renderbuffer = gl.createRenderbuffer();
			gl.framebufferRenderbuffer(gl.READ_FRAMEBUFFER, gl.COLOR_ATTACHMENT8, gl.RENDERBUFFER,
				renderbuffer);

			let errorCode = gl.getError();
			console.info("webgltest framebufferRenderbuffer getError: " + errorCode);
			expect(errorCode).assertEqual(gl.NO_ERROR);
			
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_5900
		 * @tc.name webgl_test_framebufferRenderbuffer9
		 * @tc.desc Test framebufferRenderbuffer.
		 */
		it('webgl_test_framebufferRenderbuffer9', 0, async function (done) {
			
			console.info("webgltest into framebufferRenderbuffer");

			const renderbuffer = gl.createRenderbuffer();
			gl.framebufferRenderbuffer(gl.READ_FRAMEBUFFER, gl.COLOR_ATTACHMENT9, gl.RENDERBUFFER,
				renderbuffer);

			let errorCode = gl.getError();
			console.info("webgltest framebufferRenderbuffer getError: " + errorCode);
			expect(errorCode).assertEqual(gl.NO_ERROR);
			
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_6000
		 * @tc.name webgl_test_framebufferRenderbuffer10
		 * @tc.desc Test framebufferRenderbuffer.
		 */
		it('webgl_test_framebufferRenderbuffer10', 0, async function (done) {
			
			console.info("webgltest into framebufferRenderbuffer");

			const renderbuffer = gl.createRenderbuffer();
			gl.framebufferRenderbuffer(gl.READ_FRAMEBUFFER, gl.COLOR_ATTACHMENT10, gl.RENDERBUFFER,
				renderbuffer);

			let errorCode = gl.getError();
			console.info("webgltest framebufferRenderbuffer getError: " + errorCode);
			expect(errorCode).assertEqual(gl.NO_ERROR);
			
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_6100
		 * @tc.name webgl_test_framebufferRenderbuffer11
		 * @tc.desc Test framebufferRenderbuffer.
		 */
		it('webgl_test_framebufferRenderbuffer11', 0, async function (done) {
			
			console.info("webgltest into framebufferRenderbuffer");

			const renderbuffer = gl.createRenderbuffer();
			gl.framebufferRenderbuffer(gl.READ_FRAMEBUFFER, gl.COLOR_ATTACHMENT11, gl.RENDERBUFFER,
				renderbuffer);

			let errorCode = gl.getError();
			console.info("webgltest framebufferRenderbuffer getError: " + errorCode);
			expect(errorCode).assertEqual(gl.NO_ERROR);
			
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_6200
		 * @tc.name webgl_test_framebufferRenderbuffer12
		 * @tc.desc Test framebufferRenderbuffer.
		 */
		it('webgl_test_framebufferRenderbuffer12', 0, async function (done) {
			
			console.info("webgltest into framebufferRenderbuffer");

			const renderbuffer = gl.createRenderbuffer();
			gl.framebufferRenderbuffer(gl.READ_FRAMEBUFFER, gl.COLOR_ATTACHMENT12, gl.RENDERBUFFER,
				renderbuffer);
			let errorCode = gl.getError();
			console.info("webgltest framebufferRenderbuffer getError: " + errorCode);
			expect(errorCode).assertEqual(gl.NO_ERROR);
			
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_6300
		 * @tc.name webgl_test_framebufferRenderbuffer13
		 * @tc.desc Test framebufferRenderbuffer.
		 */
		it('webgl_test_framebufferRenderbuffer13', 0, async function (done) {
			
			console.info("webgltest into framebufferRenderbuffer");

			const renderbuffer = gl.createRenderbuffer();
			gl.framebufferRenderbuffer(gl.READ_FRAMEBUFFER, gl.COLOR_ATTACHMENT13, gl.RENDERBUFFER,
				renderbuffer);

			let errorCode = gl.getError();
			console.info("webgltest framebufferRenderbuffer getError: " + errorCode);
			expect(errorCode).assertEqual(gl.NO_ERROR);
			
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_6400
		 * @tc.name webgl_test_framebufferRenderbuffer14
		 * @tc.desc Test framebufferRenderbuffer.
		 */
		it('webgl_test_framebufferRenderbuffer14', 0, async function (done) {
			
			console.info("webgltest into framebufferRenderbuffer");

			const renderbuffer = gl.createRenderbuffer();
			gl.framebufferRenderbuffer(gl.READ_FRAMEBUFFER, gl.COLOR_ATTACHMENT14, gl.RENDERBUFFER,
				renderbuffer);

			let errorCode = gl.getError();
			console.info("webgltest framebufferRenderbuffer getError: " + errorCode);
			expect(errorCode).assertEqual(gl.NO_ERROR);
			
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_6500
		 * @tc.name webgl_test_framebufferRenderbuffer15
		 * @tc.desc Test framebufferRenderbuffer.
		 */
		it('webgl_test_framebufferRenderbuffer15', 0, async function (done) {
			
			console.info("webgltest into framebufferRenderbuffer");

			const renderbuffer = gl.createRenderbuffer();
			gl.framebufferRenderbuffer(gl.READ_FRAMEBUFFER, gl.COLOR_ATTACHMENT15, gl.RENDERBUFFER,
				renderbuffer);

			let errorCode = gl.getError();
			console.info("webgltest framebufferRenderbuffer getError: " + errorCode);
			expect(errorCode).assertEqual(gl.NO_ERROR);
			
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_6600
		 * @tc.name testGetParameter_1
		 * @tc.desc Test getParameter.
		 */
		it('testGetParameter_1', 0, async function (done) {
			
			console.info('jsWebGL getParameter test start ...' + JSON.stringify(gl));
			gl.activeTexture(gl.TEXTURE0);
			var textureParameter = gl.getParameter(gl.BLEND_DST_ALPHA);
			
			console.info("activeTexture --> getParameter: " + textureParameter);
			let errorCode = gl.getError();
			console.info("webgltest framebufferRenderbuffer getError: " + errorCode);
			expect(errorCode).assertEqual(gl.NO_ERROR);
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_6700
		 * @tc.name testGetParameter_2
		 * @tc.desc Test getParameter.
		 */
		it('testGetParameter_2', 0, async function (done) {
			
			console.info('jsWebGL getParameter test start ...' + JSON.stringify(gl));
			gl.activeTexture(gl.TEXTURE0);
			var textureParameter = gl.getParameter(gl.ALIASED_POINT_SIZE_RANGE);
			
			console.info("activeTexture --> getParameter: " + textureParameter);
			let errorCode = gl.getError();
			console.info("webgltest framebufferRenderbuffer getError: " + errorCode);
			expect(errorCode).assertEqual(gl.NO_ERROR);
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_6800
		 * @tc.name testGetParameter_3
		 * @tc.desc Test getParameter.
		 */
		it('testGetParameter_3', 0, async function (done) {
			
			console.info('jsWebGL getParameter test start ...' + JSON.stringify(gl));
			gl.activeTexture(gl.TEXTURE0);
			var textureParameter = gl.getParameter(gl.BLUE_BITS);
			
			console.info("activeTexture --> getParameter: " + textureParameter);
			let errorCode = gl.getError();
			console.info("webgltest framebufferRenderbuffer getError: " + errorCode);
			// The webgl interface transparently transmits opengl.Therefore, only need to verify the interface does not crash.
			const notCrash = true;
			expect(notCrash).assertTrue();
			for(let err; (err = gl.getError()) != gl.NO_ERROR;) {}
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_6900
		 * @tc.name testGetParameter_4
		 * @tc.desc Test getParameter.
		 */
		it('testGetParameter_4', 0, async function (done) {
			
			console.info('jsWebGL getParameter test start ...' + JSON.stringify(gl));
			gl.activeTexture(gl.TEXTURE0);
			var textureParameter = gl.getParameter(gl.ALPHA_BITS);
			
			console.info("activeTexture --> getParameter: " + textureParameter);
			let errorCode = gl.getError();
			console.info("webgltest framebufferRenderbuffer getError: " + errorCode);
			// The webgl interface transparently transmits opengl.Therefore, only need to verify the interface does not crash.
			const notCrash = true;
			expect(notCrash).assertTrue();
			for(let err; (err = gl.getError()) != gl.NO_ERROR;) {}
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_7000
		 * @tc.name testGetParameter_5
		 * @tc.desc Test getParameter.
		 */
		it('testGetParameter_5', 0, async function (done) {
			
			console.info('jsWebGL getParameter test start ...' + JSON.stringify(gl));
			gl.activeTexture(gl.TEXTURE0);
			var textureParameter = gl.getParameter(gl.COMPRESSED_TEXTURE_FORMATS);
			
			console.info("activeTexture --> getParameter: " + textureParameter);
			let errorCode = gl.getError();
			console.info("webgltest framebufferRenderbuffer getError: " + errorCode);
			expect(errorCode).assertEqual(gl.NO_ERROR);
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_7100
		 * @tc.name testGetParameter_6
		 * @tc.desc Test getParameter.
		 */
		it('testGetParameter_6', 0, async function (done) {
			
			console.info('jsWebGL getParameter test start ...' + JSON.stringify(gl));
			gl.activeTexture(gl.TEXTURE0);
			var textureParameter = gl.getParameter(gl.ELEMENT_ARRAY_BUFFER_BINDING);
			
			console.info("activeTexture --> getParameter: " + textureParameter);
			let errorCode = gl.getError();
			console.info("webgltest framebufferRenderbuffer getError: " + errorCode);
			expect(errorCode).assertEqual(gl.NO_ERROR);
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_7200
		 * @tc.name testGetParameter_7
		 * @tc.desc Test getParameter.
		 */
		it('testGetParameter_7', 0, async function (done) {
			
			console.info('jsWebGL getParameter test start ...' + JSON.stringify(gl));
			gl.activeTexture(gl.TEXTURE0);
			var textureParameter = gl.getParameter(gl.FRONT_FACE);
			
			console.info("activeTexture --> getParameter: " + textureParameter);
			let errorCode = gl.getError();
			console.info("webgltest framebufferRenderbuffer getError: " + errorCode);
			expect(errorCode).assertEqual(gl.NO_ERROR);
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_7300
		 * @tc.name testGetParameter_8
		 * @tc.desc Test getParameter.
		 */
		it('testGetParameter_8', 0, async function (done) {
			
			console.info('jsWebGL getParameter test start ...' + JSON.stringify(gl));
			gl.activeTexture(gl.TEXTURE0);
			var textureParameter = gl.getParameter(gl.GREEN_BITS);
			
			console.info("activeTexture --> getParameter: " + textureParameter);
			let errorCode = gl.getError();
			console.info("webgltest framebufferRenderbuffer getError: " + errorCode);
			// The webgl interface transparently transmits opengl.Therefore, only need to verify the interface does not crash.
			const notCrash = true;
			expect(notCrash).assertTrue();
			for(let err; (err = gl.getError()) != gl.NO_ERROR;) {}
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_7400
		 * @tc.name testGetParameter_9
		 * @tc.desc Test getParameter.
		 */
		it('testGetParameter_9', 0, async function (done) {
			
			console.info('jsWebGL getParameter test start ...' + JSON.stringify(gl));
			gl.activeTexture(gl.TEXTURE0);
			var textureParameter = gl.getParameter(gl.IMPLEMENTATION_COLOR_READ_FORMAT);
			
			console.info("activeTexture --> getParameter: " + textureParameter);
			let errorCode = gl.getError();
			console.info("webgltest framebufferRenderbuffer getError: " + errorCode);
			expect(errorCode != null).assertTrue();
			for(let err; (err = gl.getError()) != gl.NO_ERROR;) {}
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_7500
		 * @tc.name testGetParameter_10
		 * @tc.desc Test getParameter.
		 */
		it('testGetParameter_10', 0, async function (done) {
			
			console.info('jsWebGL getParameter test start ...' + JSON.stringify(gl));
			gl.activeTexture(gl.TEXTURE0);
			var textureParameter = gl.getParameter(gl.IMPLEMENTATION_COLOR_READ_TYPE);
			
			console.info("activeTexture --> getParameter: " + textureParameter);
			let errorCode = gl.getError();
			console.info("webgltest framebufferRenderbuffer getError: " + errorCode);
			expect(errorCode != null).assertTrue();
			for(let err; (err = gl.getError()) != gl.NO_ERROR;) {}
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_7600
		 * @tc.name testGetParameter_11
		 * @tc.desc Test getParameter.
		 */
		it('testGetParameter_11', 0, async function (done) {
			
			console.info('jsWebGL getParameter test start ...' + JSON.stringify(gl));
			gl.activeTexture(gl.TEXTURE0);
			var textureParameter = gl.getParameter(gl.MAX_COMBINED_TEXTURE_IMAGE_UNITS);
			
			console.info("activeTexture --> getParameter: " + textureParameter);
			let errorCode = gl.getError();
			console.info("webgltest framebufferRenderbuffer getError: " + errorCode);
			expect(errorCode).assertEqual(gl.NO_ERROR);
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_7700
		 * @tc.name testGetParameter_12
		 * @tc.desc Test getParameter.
		 */
		it('testGetParameter_12', 0, async function (done) {
			
			console.info('jsWebGL getParameter test start ...' + JSON.stringify(gl));
			gl.activeTexture(gl.TEXTURE0);
			var textureParameter = gl.getParameter(gl.MAX_CUBE_MAP_TEXTURE_SIZE);
			
			console.info("activeTexture --> getParameter: " + textureParameter);
			let errorCode = gl.getError();
			console.info("webgltest framebufferRenderbuffer getError: " + errorCode);
			expect(errorCode).assertEqual(gl.NO_ERROR);
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_7800
		 * @tc.name testGetParameter_13
		 * @tc.desc Test getParameter.
		 */
		it('testGetParameter_13', 0, async function (done) {
			
			console.info('jsWebGL getParameter test start ...' + JSON.stringify(gl));
			gl.activeTexture(gl.TEXTURE0);
			var textureParameter = gl.getParameter(gl.MAX_FRAGMENT_UNIFORM_VECTORS);
			
			console.info("activeTexture --> getParameter: " + textureParameter);
			let errorCode = gl.getError();
			console.info("webgltest framebufferRenderbuffer getError: " + errorCode);
			expect(errorCode).assertEqual(gl.NO_ERROR);
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_7900
		 * @tc.name testGetParameter_14
		 * @tc.desc Test getParameter.
		 */
		it('testGetParameter_14', 0, async function (done) {
			
			console.info('jsWebGL getParameter test start ...' + JSON.stringify(gl));
			gl.activeTexture(gl.TEXTURE0);
			var textureParameter = gl.getParameter(gl.MAX_RENDERBUFFER_SIZE);
			
			console.info("activeTexture --> getParameter: " + textureParameter);
			let errorCode = gl.getError();
			console.info("webgltest framebufferRenderbuffer getError: " + errorCode);
			expect(errorCode).assertEqual(gl.NO_ERROR);
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_8000
		 * @tc.name testGetParameter_15
		 * @tc.desc Test getParameter.
		 */
		it('testGetParameter_15', 0, async function (done) {
			
			console.info('jsWebGL getParameter test start ...' + JSON.stringify(gl));
			gl.activeTexture(gl.TEXTURE0);
			var textureParameter = gl.getParameter(gl.MAX_TEXTURE_IMAGE_UNITS);
			
			console.info("activeTexture --> getParameter: " + textureParameter);
			let errorCode = gl.getError();
			console.info("webgltest framebufferRenderbuffer getError: " + errorCode);
			expect(errorCode).assertEqual(gl.NO_ERROR);
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_8100
		 * @tc.name testGetParameter_16
		 * @tc.desc Test getParameter.
		 */
		it('testGetParameter_16', 0, async function (done) {
			
			console.info('jsWebGL getParameter test start ...' + JSON.stringify(gl));
			gl.activeTexture(gl.TEXTURE0);
			var textureParameter = gl.getParameter(gl.MAX_TEXTURE_SIZE);
			
			console.info("activeTexture --> getParameter: " + textureParameter);
			let errorCode = gl.getError();
			console.info("webgltest framebufferRenderbuffer getError: " + errorCode);
			expect(errorCode).assertEqual(gl.NO_ERROR);
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_8200
		 * @tc.name testGetParameter_17
		 * @tc.desc Test getParameter.
		 */
		it('testGetParameter_17', 0, async function (done) {
			
			console.info('jsWebGL getParameter test start ...' + JSON.stringify(gl));
			gl.activeTexture(gl.TEXTURE0);
			var textureParameter = gl.getParameter(gl.MAX_VARYING_VECTORS);
			
			console.info("activeTexture --> getParameter: " + textureParameter);
			let errorCode = gl.getError();
			console.info("webgltest framebufferRenderbuffer getError: " + errorCode);
			expect(errorCode).assertEqual(gl.NO_ERROR);
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_8300
		 * @tc.name testGetParameter_18
		 * @tc.desc Test getParameter.
		 */
		it('testGetParameter_18', 0, async function (done) {
			
			console.info('jsWebGL getParameter test start ...' + JSON.stringify(gl));
			gl.activeTexture(gl.TEXTURE0);
			var textureParameter = gl.getParameter(gl.MAX_VERTEX_ATTRIBS);
			
			console.info("activeTexture --> getParameter: " + textureParameter);
			let errorCode = gl.getError();
			console.info("webgltest framebufferRenderbuffer getError: " + errorCode);
			expect(errorCode).assertEqual(gl.NO_ERROR);
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_8400
		 * @tc.name testGetParameter_19
		 * @tc.desc Test getParameter.
		 */
		it('testGetParameter_19', 0, async function (done) {
			
			console.info('jsWebGL getParameter test start ...' + JSON.stringify(gl));
			gl.activeTexture(gl.TEXTURE0);
			var textureParameter = gl.getParameter(gl.MAX_VERTEX_TEXTURE_IMAGE_UNITS);
			
			console.info("activeTexture --> getParameter: " + textureParameter);
			let errorCode = gl.getError();
			console.info("webgltest framebufferRenderbuffer getError: " + errorCode);
			expect(errorCode).assertEqual(gl.NO_ERROR);
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_8500
		 * @tc.name testGetParameter_20
		 * @tc.desc Test getParameter.
		 */
		it('testGetParameter_20', 0, async function (done) {
			
			console.info('jsWebGL getParameter test start ...' + JSON.stringify(gl));
			gl.activeTexture(gl.TEXTURE0);
			var textureParameter = gl.getParameter(gl.MAX_VERTEX_UNIFORM_VECTORS);
			
			console.info("activeTexture --> getParameter: " + textureParameter);
			let errorCode = gl.getError();
			console.info("webgltest framebufferRenderbuffer getError: " + errorCode);
			expect(errorCode).assertEqual(gl.NO_ERROR);
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_8600
		 * @tc.name testGetParameter_21
		 * @tc.desc Test getParameter.
		 */
		it('testGetParameter_21', 0, async function (done) {
			
			console.info('jsWebGL getParameter test start ...' + JSON.stringify(gl));
			gl.activeTexture(gl.TEXTURE0);
			var textureParameter = gl.getParameter(gl.POLYGON_OFFSET_FACTOR);
			
			console.info("activeTexture --> getParameter: " + textureParameter);
			let errorCode = gl.getError();
			console.info("webgltest framebufferRenderbuffer getError: " + errorCode);
			expect(errorCode).assertEqual(gl.NO_ERROR);
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_8700
		 * @tc.name testGetParameter_22
		 * @tc.desc Test getParameter.
		 */
		it('testGetParameter_22', 0, async function (done) {
			
			console.info('jsWebGL getParameter test start ...' + JSON.stringify(gl));
			gl.activeTexture(gl.TEXTURE0);
			var textureParameter = gl.getParameter(gl.POLYGON_OFFSET_UNITS);
			
			console.info("activeTexture --> getParameter: " + textureParameter);
			let errorCode = gl.getError();
			console.info("webgltest framebufferRenderbuffer getError: " + errorCode);
			expect(errorCode).assertEqual(gl.NO_ERROR);
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_8800
		 * @tc.name testGetParameter_23
		 * @tc.desc Test getParameter.
		 */
		it('testGetParameter_23', 0, async function (done) {
			
			console.info('jsWebGL getParameter test start ...' + JSON.stringify(gl));
			gl.activeTexture(gl.TEXTURE0);
			var textureParameter = gl.getParameter(gl.RED_BITS);
			
			console.info("activeTexture --> getParameter: " + textureParameter);
			let errorCode = gl.getError();
			console.info("webgltest framebufferRenderbuffer getError: " + errorCode);
			// The webgl interface transparently transmits opengl.Therefore, only need to verify the interface does not crash.
			const notCrash = true;
			expect(notCrash).assertTrue();
			for(let err; (err = gl.getError()) != gl.NO_ERROR;) {}
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_8900
		 * @tc.name testGetParameter_24
		 * @tc.desc Test getParameter.
		 */
		it('testGetParameter_24', 0, async function (done) {
			
			console.info('jsWebGL getParameter test start ...' + JSON.stringify(gl));
			gl.activeTexture(gl.TEXTURE0);
			var textureParameter = gl.getParameter(gl.RENDERER);
			
			console.info("activeTexture --> getParameter: " + textureParameter);
			let errorCode = gl.getError();
			console.info("webgltest framebufferRenderbuffer getError: " + errorCode);
			expect(errorCode).assertEqual(gl.NO_ERROR);
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_9000
		 * @tc.name testGetParameter_25
		 * @tc.desc Test getParameter.
		 */
		it('testGetParameter_25', 0, async function (done) {
			
			console.info('jsWebGL getParameter test start ...' + JSON.stringify(gl));
			gl.activeTexture(gl.TEXTURE0);
			var textureParameter = gl.getParameter(gl.SAMPLE_BUFFERS);
			
			console.info("activeTexture --> getParameter: " + textureParameter);
			let errorCode = gl.getError();
			console.info("webgltest framebufferRenderbuffer getError: " + errorCode);
			// The webgl interface transparently transmits opengl.Therefore, only need to verify the interface does not crash.
			const notCrash = true;
			expect(notCrash).assertTrue();
			for(let err; (err = gl.getError()) != gl.NO_ERROR;) {}
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_9100
		 * @tc.name testGetParameter_26
		 * @tc.desc Test getParameter.
		 */
		it('testGetParameter_26', 0, async function (done) {
			
			console.info('jsWebGL getParameter test start ...' + JSON.stringify(gl));
			gl.activeTexture(gl.TEXTURE0);
			var textureParameter = gl.getParameter(gl.STENCIL_BACK_FAIL);
			
			console.info("activeTexture --> getParameter: " + textureParameter);
			let errorCode = gl.getError();
			console.info("webgltest framebufferRenderbuffer getError: " + errorCode);
			expect(errorCode).assertEqual(gl.NO_ERROR);
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_9200
		 * @tc.name testGetParameter_27
		 * @tc.desc Test getParameter.
		 */
		it('testGetParameter_27', 0, async function (done) {
			
			console.info('jsWebGL getParameter test start ...' + JSON.stringify(gl));
			gl.activeTexture(gl.TEXTURE0);
			var textureParameter = gl.getParameter(gl.STENCIL_BACK_FUNC);
			
			console.info("activeTexture --> getParameter: " + textureParameter);
			let errorCode = gl.getError();
			console.info("webgltest framebufferRenderbuffer getError: " + errorCode);
			expect(errorCode).assertEqual(gl.NO_ERROR);
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_9300
		 * @tc.name testGetParameter_28
		 * @tc.desc Test getParameter.
		 */
		it('testGetParameter_28', 0, async function (done) {
			
			console.info('jsWebGL getParameter test start ...' + JSON.stringify(gl));
			gl.activeTexture(gl.TEXTURE0);
			var textureParameter = gl.getParameter(gl.STENCIL_BACK_PASS_DEPTH_FAIL);
			
			console.info("activeTexture --> getParameter: " + textureParameter);
			let errorCode = gl.getError();
			console.info("webgltest framebufferRenderbuffer getError: " + errorCode);
			expect(errorCode).assertEqual(gl.NO_ERROR);
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_9400
		 * @tc.name testGetParameter_29
		 * @tc.desc Test getParameter.
		 */
		it('testGetParameter_29', 0, async function (done) {
			
			console.info('jsWebGL getParameter test start ...' + JSON.stringify(gl));
			gl.activeTexture(gl.TEXTURE0);
			var textureParameter = gl.getParameter(gl.STENCIL_BACK_PASS_DEPTH_PASS);
			
			console.info("activeTexture --> getParameter: " + textureParameter);
			let errorCode = gl.getError();
			console.info("webgltest framebufferRenderbuffer getError: " + errorCode);
			expect(errorCode).assertEqual(gl.NO_ERROR);
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_9500
		 * @tc.name testGetParameter_30
		 * @tc.desc Test getParameter.
		 */
		it('testGetParameter_30', 0, async function (done) {
			
			console.info('jsWebGL getParameter test start ...' + JSON.stringify(gl));
			gl.activeTexture(gl.TEXTURE0);
			var textureParameter = gl.getParameter(gl.STENCIL_BACK_REF);
			
			console.info("activeTexture --> getParameter: " + textureParameter);
			let errorCode = gl.getError();
			console.info("webgltest framebufferRenderbuffer getError: " + errorCode);
			expect(errorCode).assertEqual(gl.NO_ERROR);
			done();
		});


		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_9600
		 * @tc.name testGetParameter_31
		 * @tc.desc Test getParameter.
		 */
		it('testGetParameter_31', 0, async function (done) {
			
			console.info('jsWebGL getParameter test start ...' + JSON.stringify(gl));
			gl.activeTexture(gl.TEXTURE0);
			var textureParameter = gl.getParameter(gl.STENCIL_BACK_VALUE_MASK);
			
			console.info("activeTexture --> getParameter: " + textureParameter);
			let errorCode = gl.getError();
			console.info("webgltest framebufferRenderbuffer getError: " + errorCode);
			expect(errorCode).assertEqual(gl.NO_ERROR);
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_9700
		 * @tc.name testGetParameter_32
		 * @tc.desc Test getParameter.
		 */
		it('testGetParameter_32', 0, async function (done) {
			
			console.info('jsWebGL getParameter test start ...' + JSON.stringify(gl));
			gl.activeTexture(gl.TEXTURE0);
			var textureParameter = gl.getParameter(gl.STENCIL_BACK_WRITEMASK);
			
			console.info("activeTexture --> getParameter: " + textureParameter);
			let errorCode = gl.getError();
			console.info("webgltest framebufferRenderbuffer getError: " + errorCode);
			expect(errorCode).assertEqual(gl.NO_ERROR);
			done();
		});


		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_9800
		 * @tc.name testGetParameter_33
		 * @tc.desc Test getParameter.
		 */
		it('testGetParameter_33', 0, async function (done) {
			
			console.info('jsWebGL getParameter test start ...' + JSON.stringify(gl));
			gl.activeTexture(gl.TEXTURE0);
			var textureParameter = gl.getParameter(gl.STENCIL_BITS);
			
			console.info("activeTexture --> getParameter: " + textureParameter);
			let errorCode = gl.getError();
			console.info("webgltest framebufferRenderbuffer getError: " + errorCode);
			// The webgl interface transparently transmits opengl.Therefore, only need to verify the interface does not crash.
			const notCrash = true;
			expect(notCrash).assertTrue();
			for(let err; (err = gl.getError()) != gl.NO_ERROR;) {}
			done();
		});

		/**
		 * @tc.number SUB_BASIC_GRAPHICS_SPECIAL_XTS_WEBGL_11_9900
		 * @tc.name testGetParameter_34
		 * @tc.desc Test getParameter.
		 */
		it('testGetParameter_34', 0, async function (done) {
			
			console.info('jsWebGL getParameter test start ...' + JSON.stringify(gl));
			gl.activeTexture(gl.TEXTURE0);
			var textureParameter = gl.getParameter(gl.STENCIL_PASS_DEPTH_FAIL);
			
			console.info("activeTexture --> getParameter: " + textureParameter);
			let errorCode = gl.getError();
			console.info("webgltest framebufferRenderbuffer getError: " + errorCode);
			expect(errorCode).assertEqual(gl.NO_ERROR);
			done();
		});
	})
}